<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/>
    <title>管理主页</title>
    <link rel="icon" href="../../module/favicon.ico" type="image/ico">
    <link href="../../module/css/bootstrap.min.css" rel="stylesheet">
    <link href="../../module/css/materialdesignicons.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../../module/js/jconfirm/jquery-confirm.min.css">
    <link href="../../module/css/style.min.css" rel="stylesheet">

    <script type="text/javascript" src="../../module/js/jquery.min.js"></script>
    <script type="text/javascript" src="../../module/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../../module/js/perfect-scrollbar.min.js"></script>
    <script type="text/javascript" src="../../module/js/jconfirm/jquery-confirm.min.js"></script>
    <script type="text/javascript" src="../../module/js/main.min.js"></script>
    <script type="text/javascript" src="../../module/js/Chart.js"></script>
    <script type="text/javascript" src="../../js/base.js"></script>
    <script type="text/javascript" src="../../js/seller/seller-ajax.js"></script>
    <script type="text/javascript" src="../../js/seller/seller-js.js"></script>
</head>
<body>

<div class="lyear-layout-web">
    <div class="lyear-layout-container">
        <!--左侧导航-->
        <aside class="lyear-layout-sidebar">
            <!-- logo -->
            <div id="logo" class="sidebar-header">
                <a href="../../index.html"> <img alt="light year admin" src="/static/logo.png"
                                                 style="height: 64px; margin: 0"> </a>
            </div>
            <div class="lyear-layout-sidebar-scroll">
                <nav class="sidebar-main">
                    <ul class="nav nav-drawer">
                        <li class="nav-item active"><a onclick="home_page()" style="cursor: pointer">
                            <i class="mdi mdi-home"></i>后台首页</a></li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-shopping"></i>商品管理</a>
                            <ul class="nav nav-subnav">
                                <li id="bar-product-list-li"><a onclick="product_list_page()" style="cursor: pointer">商品列表</a>
                                </li>
                                <li id="bar-product-upload-li"><a onclick="product_upload_page()"
                                                                  style="cursor: pointer">商品上传</a></li>
                                <li id="bar-product-detail-li"><a>商品详情</a></li>
                                <li id="bar-product-update-li"><a>商品修改</a></li>
                            </ul>
                        </li>
                        <li class="nav-item nav-item-has-subnav">
                            <a href="javascript:void(0)"><i class="mdi mdi-library-books"></i>订单管理</a>
                            <ul class="nav nav-subnav">
                                <li id="bar-order-list-li"><a onclick="order_list_page()"
                                                              style="cursor: pointer">订单列表</a></li>
                                <li id="bar-order-detail-li"><a>订单详情</a></li>
                            </ul>
                        </li>
                    </ul>
                </nav>
            </div>
        </aside>
        <header class="lyear-layout-header">
            <nav class="navbar navbar-default">
                <div class="topbar">
                    <div class="topbar-left">
                        <div class="lyear-aside-toggler">
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                            <span class="lyear-toggler-bar"></span>
                        </div>
                        <span class="navbar-page-title"> 商家管理后台 </span>
                    </div>
                    <ul class="topbar-right">
                        <li class="dropdown dropdown-profile">
                            <a href="javascript:void(0)" data-toggle="dropdown">
                                <span><span id="username-display">用户名</span><span class="caret"></span></span>
                            </a>
                            <ul class="dropdown-menu dropdown-menu-right">
                                <li><a href="#"><i class="mdi mdi-account"></i>个人信息</a></li>
                                <li><a href="../buyer/index.html"><i class="mdi mdi-clipboard"></i>进入买家版</a></li>
                                <li class="divider"></li>
                                <li><a href="#"><i class="mdi mdi-lock-outline"></i>修改密码</a></li>
                                <li><a onclick="log_out()" style="cursor: pointer"><i
                                        class="mdi mdi-logout-variant"></i>退出登录</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
    </div>

    <main class="lyear-layout-content">

    </main>


    <script>
        var this_store_name;
        var this_user_name;
        var product_id = null;
        $(document).ready(function () {
            //开发阶段注释
            if (localStorage.getItem("token") === null) {
                alert_and_redirect("未登录，请先登录。3秒后跳转到登录页...","../user/login.html",3);
                return;
            }
            var info = seller_login_verification(localStorage.getItem("token"));
            document.title = document.title + " - " + info.storeName;
            this_store_name = info.storeName;
            this_user_name = info.username;
            document.getElementById("username-display").innerHTML = info.username;

            $("main").load("element/index.html");
        })
    </script>
</div>

</body>

</html>